Repository navigation
kboot: T6050: populate and enable single-die MCC from the ADT - #493
Merged
Merged
Conversation
Single-die T6050 Linux device trees (t6050-max.dtsi) describe the die-0 memory cache controller (apple,t6050-mcc) with status = "disabled" because M5 Pro and both 460 GB/s and 614 GB/s M5 Max SKUs share the same board trees and fused-off AMCC apertures cannot be probed safely from Linux. When the Linux tree has a single disabled apple,t6050-mcc node, read the enabled AMCC mask and register windows from /arm-io/mcc and the plane geometry and aperture list from /chosen/lock-regs/amcc. Require explicit single-die confirmation (die-count or die-enable-mask equal to 1), amcc-enable-mask, plane-count, 16 KiB-aligned plane-stride and register bases, non-overlapping plane apertures, and cross-checks against lock-regs aperture addresses (plus optional aperture-count, aperture-size, dcs-channel-enable-mask, and amcc-plane-enable-mask when present). Translate each 16 KiB plane aperture through the parent bus ranges using explicit #address-cells/#size-cells and verify that Linux's forward child-first ranges lookup resolves back to the same physical address before writing reg and setting status = "okay". Already-enabled nodes (such as two-die M5 Ultra) are left untouched. If any required property is missing or any required or optional check fails, the node stays disabled with its original reg intact. Signed-off-by: Erik Bourget <erik@ebourget.net>
DjDeveloperr
approved these changes
Nov 24, 2026
DjDeveloperr
left a comment
Contributor
There was a problem hiding this comment.
Full §1–§6 pre-PR checklist audit at exact head fc5dd4d0ce1b5622cbe4c0bc382df320e8d844e0:
- §1 No model gating — PASS: No chip, board, SKU, or firmware-version gates. Behavior is driven purely from the Linux FDT (
apple,t6050-mcc,status = "disabled", explicit#address-cells/#size-cellsandranges) and the live ADT (/arm-io/mcccompatible = "mcc,t6050", explicit single-die confirmation viadie-count/die-enable-mask == 1,amcc-*, optionaldcs-channel-enable-mask/amcc-plane-enable-mask, and/chosen/lock-regs/amcc). Non-T6050 trees return immediately onfdt_node_offset_by_compatible < 0; already-enabled trees (including two-die M5 Ultrat6050-ultra.dtsi) are left untouched; multipleapple,t6050-mccnodes and dual-die ADTs fail closed. Non-lab SKUs (M5 Pro, binned 460 GB/s M5 Max) are transparently called out under Still to run and covered by host tests. - §2 Production-ready, no hacks — PASS: Works on the default kernel command line with no new parameters, delays, retries, or lab-only paths.
- §3 Safety — PASS (Stage-1 owner sign-off still required before merge):
- Bounds, width, alignment, overflow, and fail-closed checks are thorough: strict 4/8-byte ADT decoding (
memcpy-safe under-mstrict-align), non-zero and in-bounds bitmask checks (handling the 64-bit shift edge cleanly), 16 KiB alignment onplane-strideand enabled AMCC bases, overflow-guardedreach/base + size/ plane overlap (seen[]) checks, cross-checking every enabled AMCC against/chosen/lock-regs/amccaperture-phys-addr(andaperture-sizewhen present), never querying or emitting disabled/fused-off AMCCs, and roundtrip-verifying reverse parent-rangestranslation against Linux's child-first forward lookup before mutating the FDT. Zero MMIO touches, bounded stack/heap (<= 1536 B freed on both paths), and FDT write failures leavestatus = "disabled"and originalregintact without aborting boot. - Stage-1 note:
src/kboot.cis linked into Stage-1 images (aura-raw.elf), even thoughdt_set_t6050_mcc()runs during Stage-2kboot_prepare_dt(). All shipping Stage-1 flavours (stage1,stage1-secure-audit,stage1-secure-enforce) passstage1-sizeacross all 5 CI toolchains with 12–81 KiB headroom (the non-required lab buildgcc stage1-dev-auditdid not link on CI Ubuntu GCC). Keep for Stage-1 / repo owner sign-off (@RyanTheTide) before merging.
- Bounds, width, alignment, overflow, and fail-closed checks are thorough: strict 4/8-byte ADT decoding (
- §4 Clean-room & attribution — PASS: Clean-room implementation using public ADT/DT interfaces; commit
fc5dd4d0ce1bhas human author/committer (Erik Bourget), humanSigned-off-by:only, and zero AI commit trailers. - §5 Evidence — PASS: All 16 CI checks on
fc5dd4d0ce1bare green (build,format-check,esp-stage2-size,aurora-agent-policy, all 5testjobs compiling the productionsrc/kboot.cslice againstlibfdt, and all 5stage1-sizejobs). Exact-head watchdog-guardedaura-tryhardware evidence on J716c (both standalonefc5dd4d0and composed with display handoff againstaurora-silicon/linux#2540) confirmsFDT: T6050 MCC: enabled (8 AMCCs, 32 planes), matching 512-byte live DTreg+status = "okay",apple-mccenabling allocation on 32 planes after DCP scanout handoff, and 0 SErrors/AVC denials/new failed units. M5 Pro and binned 460 GB/s M5 Max hardware verification remains pending on non-lab hardware. - §6 Naming — PASS: Aura/Aurora naming throughout.
Minor non-blocking note: why = "ranges"; is set before the per-AMCC loop in dt_set_t6050_mcc(), so an adt_get_reg(), aperture-phys-addr/aperture-size, or plane-overlap rejection inside that loop logs "FDT: T6050 MCC: ranges; leaving disabled" rather than "ADT"/"lock-regs". Purely cosmetic in the fail-closed diagnostic string; no functional impact.
Assisted-by: LLM (Gemini 4 Neon)
This was referenced Nov 24, 2026
DjDeveloperr
added a commit
that referenced
this pull request
Nov 24, 2026
…andoff" This reverts commit a7a616a, reversing changes made to b294045. Reverting #470 alone restored linking on all toolchains and passed nix, but gcc stage1 headroom landed at 3,640 B (456 B below the 4,096 B floor in tools/stage1_size.sh). Also revert #493 (2,048 B on gcc) as the minimum 2-PR revert set that clears the 4,096 B floor on gcc while keeping #492, #474, #427, and #443. Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
Contributor
kazuhidet
pushed a commit
to kazuhidet/aura
that referenced
this pull request
Nov 24, 2026
…3tips/t8132-dcpext-adt-v2" This reverts commit 7bc55fe, reversing changes made to 27847f1. Bisecting Stage 1 size across merges since 59af506 showed that aurora-silicon#493 (a7a616a) still linked and passed gcc/fedora/alarm/nix stage1-size, and aurora-silicon#427 (27847f1) still linked with 8,584 B text headroom on clang, while aurora-silicon#470 (+1,626 lines in src/kboot_display_handoff.c) overflowed Stage 1 into the DCP log buffer. Revert aurora-silicon#470 to restore a green main tip while keeping aurora-silicon#492, aurora-silicon#493, aurora-silicon#474, aurora-silicon#427, and aurora-silicon#443. Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
techmore
pushed a commit
to techmore/aura
that referenced
this pull request
Nov 30, 2026
The T6050 MCC handoff (aurora-silicon#493) was reverted in aurora-silicon#511 because Stage 1 ran out of room under the DCP log buffer. Build it into the ESP Stage 2 only, which is the stage that boots Linux in the normal Stage 1 -> ESP Stage 2 chain. A direct Stage 1 boot leaves the node disabled, so the system level cache stays off there, as on main today. Signed-off-by: DjDeveloperr <hey@djdev.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Single-die T6050 Linux device trees (
t6050-max.dtsiin aurora-silicon/linux#2540) describe the die-0 memory cache controller (apple,t6050-mcc) withstatus = "disabled"because M5 Pro (4 AMCCs / 16 planes) and both 460 GB/s (binned) and 614 GB/s (8 AMCCs / 32 planes) M5 Max SKUs share the same board trees, and Linux'sapple-mccdriver probes every listed plane aperture before rejecting it. Without the bootloader populatingregfrom the live machine's ADT and enabling the node, system-level cache allocation stays off on single-die T6050 machines.Change
Add
dt_set_t6050_mcc()insrc/kboot.c(called fromkboot_prepare_dt()):apple,t6050-mccin the Linux FDT. Leave already-enabled nodes untouched (preserving two-die M5 Ultrat6050-ultra.dtsiand any opted-in board trees), and leave trees with multipleapple,t6050-mccnodes alone./arm-io/mcc(compatible = "mcc,t6050") and the plane geometry and aperture list from/chosen/lock-regs/amcc.die-countordie-enable-maskequal to1),amcc-reg-idx,amcc-count,amcc-enable-mask,plane-count, 16 KiB-alignedplane-strideand enabled AMCC bases, non-overlapping plane apertures (total <= 64), and cross-checks againstlock-regsaperture-phys-addr(plus optionalaperture-count,aperture-size,dcs-channel-enable-mask, andamcc-plane-enable-maskwhen present).rangesusing explicit#address-cells/#size-cellsand verify that Linux's forward child-firstrangeslookup resolves back to the same physical address before writingregand settingstatus = "okay".status = "disabled"and the originalregintact without aborting boot.Add
tests/python/test_t6050_mcc_handoff.pycompiling the productionsrc/kboot.cblock unchanged against Aura'slibfdtacross 25 cases (full 8-AMCC J716c, 4-AMCC M5 Pro, contiguous/non-contiguous binned masks, non-identity and two-level nestedranges, overlapping childranges, already-enabled nodes, and multi-die/missing/malformed/out-of-space fail-closed cases).Testing
clang-format --dry-run -Werror src/kboot.c— pass.pytest tests/python/test_t6050_mcc_handoff.pywith GCC, Clang, andclang -fsanitize=address,undefined— pass.NM=aarch64-linux-gnu-nm sh tools/stage1_size.sh gcc ARCH=aarch64-linux-gnu- BUILTIN_LOGO=aurora EXTRA_CFLAGS='-Wstack-usage=2048 -Os'— pass with zero size warnings (stage115856 B headroom,stage1-secure-audit/enforce81568 B,stage1-dev-audit8216 B;dt_set_t6050_mccstack 384 B,dt_ranges_step96 B).RELEASE=1 CHAINLOADING=1 USE_CLANG=1 BUILTIN_LOGO=aurora EXTRA_CFLAGS=-Oz) — pass.ESP_STAGE2=1 SPTM_VIRT=1 SPTM_VIRT_GUARDED=1 SPTM_VIRT_ESP=1 AURACTL=1) — pass (esp_vital_size.py: 811080 B / 1179648 B, 368568 B free).aura-try, kernel arm64: dts: apple: t6050: describe the single-die system cache controller linux#2540 (08fa25353657)):fc5dd4d0onmainf13056d9,1.0.0b15-gfc5dd4d0):aura_stage2.logreportsFDT: T6050 MCC: enabled (8 AMCCs, 32 planes); live/proc/device-tree/soc@2220000000/memory-controller@2220000000hasstatus = "okay"and 512-byteregmatching all 32 planes (0x2220000000..0x222e0c0000);apple-mccsafely defers (waiting for /soc@200000000/dcp@48ae00000 to retire boot scanout) whilesimpledrmowns scanout (since kboot: T6050: hand off a prewired internal panel and the combo PHY ports the tree takes #282 is not onmainyet). 0 SErrors/faults/oops, 0 AVC denials, 0 new failed units (same 1 baselineaurora-peripherals.service).f16db1b1+fc5dd4d0,1.0.0b13-g2b2ad2ab):aura_stage2.logreportsFDT: T6050 MCC: enabled (8 AMCCs, 32 planes); live DT matches all 32 planes withstatus = "okay";dmesglogsapple-dcp 48ae00000.dcp: boot scanout retired by displayed swap 6(1.158032 s) followed byapple-mcc 2220000000.memory-controller: system level cache allocation enabled on 32 planes(1.158447 s). 0 SErrors/faults/oops, 0 AVC denials, 0 new failed units.Still to run
amcc-enable-mask = 0xf, 4 AMCCs / 16 planes) and the binned 460 GB/s M5 Max (no hardware in lab; covered by host unit tests).